package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BibliotecaApp {

    public static void main(String[] args) throws IOException {
        System.out.println("Welcome User");

        Menu menu = new Menu();
        BookList booklist = new BookList();
        booklist.add(new Book("Book1"));
        booklist.add(new Book("Book2"));
        MovieList movieList = new MovieList();
        movieList.add(new Movie("Movie1","Year1","Director1","Rating1"));
        movieList.add(new Movie("Movie2","Year2","Director2","Rating2"));
        movieList.add(new Movie("Movie3","Year3","Director3","Rating3"));
        movieList.add(new Movie("Movie4","Year4","Director4","Rating4"));
        movieList.add(new Movie("Movie5","Year5","Director5","Rating5"));
        movieList.add(new Movie("Movie6","Year6","Director6","Rating6"));
        movieList.add(new Movie("Movie7","Year7","Director7","Rating7"));
        movieList.add(new Movie("Movie8","Year8","Director8","Rating8"));
        movieList.add(new Movie("Movie9","Year9","Director9","Rating9"));
        movieList.add(new Movie("Movie10","Year10","Director10","Rating10"));
        movieList.add(new Movie("Movie11","Year11","Director11","Rating11"));
        movieList.add(new Movie("Movie12","Year12","Director12","Rating12"));
        movieList.add(new Movie("Movie13","Year13","Director13","Rating13"));
        movieList.add(new Movie("Movie14","Year14","Director14","Rating14"));
        movieList.add(new Movie("Movie15","Year15","Director15","Rating15"));

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        System.out.println(menu.getMenu());

        String state = "";
        while (!(state.equals("Quit"))) {
            state = menu.selectOption(booklist, br, movieList);
            System.out.println(state);
        }
        br.close();

    }

}
